<template>
  <section class="Order_box" @click="noneBG()">
    <hgroup v-for="(items,index) in addtitle" :key="index" tag="figure" class="Order_item dip ju_al"  @touchstart.prevent="addS(index,items.url)" >
      <img :src="'./static/images/index/'+items.img+''" alt="" class="Order_img">
      <span class="Order_text">{{items.titleTextDel}}</span>
    </hgroup>
  </section>
</template>
<script>
export default {
  data(){
    return{
      addtitle:[
        // {
        //   titleTextDel:'投放广告',
        //   url:'/bomNav/Singleassistant',
        //   img:'icon.png'
        // },
        {
          titleTextDel:'接单助手',
          url:'/bomNav/SingSeas',
          img:'odeico.png'
        },
        {
          titleTextDel:'回到首页',
          url:'/bomNav',
          img:'homeindex.png'
        }
      ],
      indexs:'',
      // loginShow:false
    }
  },
  methods:{
    addS:function(id,url){
      // this.indexs = id +1
      if(id == 1){
        this.$router.replace({path:url})
      }else{
        this.$router.replace({path:url}) 
      }
      // this.$router.push({path:url})
      this.$emit('showState') //出发事件
      // console.log(22)
    },
    noneBG(){
      this.$emit('showState') 
    }
  },

  // watch: {  
  //   '$route' (to, from) { //这个在总页面的 添加才有晓得
  //   var url = '/bomNav/Singleassistant/';
  //     if(to.path === ''+url+this.indexs+''){ //到商城
  //       // this.$router.go(0)
  //       window.location.reload()
  //       // location.assign(''+url+this.indexs+'')
  //       // location.replace(''+url+this.indexs+'')
  //     }
  //   }  
  // } ,
}
</script>
<style lang="scss" scoped>
.Order_box{
  background: rgba(0,0,0,.6);
  z-index: 70;
  // overflow-y:hidden;
  // position: relative;
  position: fixed;
  top:0rem;
  left:0rem;
  margin-top:.8rem;
  width: 100%;
  // height: 11.6rem;
  height: 100%;
  // max-height: 100%;
  .Order_item{
    background: #191919;
    height: 1.5rem;
    width: 100%;
    // margin-bottom:.01rem;
    // border-bottom:.01rem solid transparent;
    border-bottom:.01rem solid #ece3e3;
    .Order_img{
      width: .6rem;
      height: 0.6rem;
    }
    .Order_text{
      // color:#fff;
      color:#d3d3d3;
      font-size:.24rem;
      margin-left:.2rem;
    }
  }
}

</style>
